[generator] fixed new warnings introduced #224
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: #217
When testing generator from xamarin-android/master, I noticed that
building a binding project has some new warnings:
Binding project: https://github.com/jonathanpeppers/GoogleAnalytics/tree/master/GoogleAnalytics.Droid
This was due to a change made in #217, I was tricked by how warnings
operate differently in
generator-Tests
than what happens in a realXamarin.Android binding project.
The difference is:
generator-Tests
put everything in one assemblyJava.Lang.*
and Android types in aseparate assembly
This means that some members that are marked
internal
will not needthe
new
keyword at all—even though the tests currently would needthe
new
keyword. The real fix here is to make the tests generate twoseparate assemblies so that we are more closely reproducing the
situation of a Xamarin.Android binding project.
Since we are branching for 15-6 soon, it seems better to revert the
new
keyword change inInterfaceGen
, and setAllowWarnings=true
where required in
generator-Tests
..I also included a comment for every test that sets
AllowWarnings=true
, so that it is clear which warning is occurring.